Skip to content

dev: fix interface implement check for "SkipDirs" #2078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 25, 2021
Merged

Conversation

shmsr
Copy link
Contributor

@shmsr shmsr commented Jun 23, 2021

For every processor, there's a compile-time check for processors to check if they implement the Processor interface:

type Processor interface {
	Process(issues []result.Issue) ([]result.Issue, error)
	Name() string
	Finish()
}

But there's a typo: SkipFiles is getting checked instead of SkipDirs

Fix:

var _ Processor = (*SkipDirs)(nil)

(or)

var _ Processor = &SkipDirs

The former is more idiomatic; so I did that.

@boring-cyborg
Copy link

boring-cyborg bot commented Jun 23, 2021

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Jun 23, 2021

CLA assistant check
All committers have signed the CLA.

@ldez ldez added the bug Something isn't working label Jun 23, 2021
@ldez ldez self-requested a review June 23, 2021 20:52
@ldez ldez changed the title processors: fix interface implement check for "SkipDirs" dev: fix interface implement check for "SkipDirs" Jun 23, 2021
@shmsr
Copy link
Contributor Author

shmsr commented Jun 24, 2021

@ldez Good for merge?

@ldez ldez merged commit f08d330 into golangci:master Jun 25, 2021
@golangci-automator
Copy link

Hey, @shmsr — we just merged your PR to golangci-lint! 🔥🚀

golangci-lint is built by awesome people like you. Let us say “thanks”: we just invited you to join the GolangCI organization on GitHub.
This will add you to our team of maintainers. Accept the invite by visiting this link.

By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.
More information about contributing is here.

Thanks again!

SeigeC pushed a commit to SeigeC/golangci-lint that referenced this pull request Apr 4, 2023
@ldez ldez added this to the v1.42 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants